﻿
    @{ Html.BeginForm(); }
    @{ Html.Telerik().Editor()
           .Name("editor")
           .Encode(false)
           .HtmlAttributes(new { style = "height:400px" })
           .Value(@<text> 
                <p>
                    <img src="@Url.Content("~/Content/Editor/editor.png")"
                            alt="Editor for ASP.NET MVC logo"
                            style="display:block;margin-left:auto;margin-right:auto;" />

                    Telerik Editor for ASP.NET MVC allows your users to edit HTML in a familiar,
                    user-friendly way.<br />
                    In this version, the Editor provides the core HTML editing engine, which includes
                    basic text formatting, hyperlinks, lists, and image handling.
                    The extension <strong>outputs identical HTML</strong>
                    across all major browsers, follows accessibility standards
                    and provides an extended programming API for content manipulation.
                </p>

                <p>Features include:</p>

                <ul>
                    <li>Text formatting & alignment</li>
                    <li>Bulleted and numbered lists</li>
                    <li>Hyperlink and image dialogs</li>
                    <li>Cross-browser support</li>
                    <li>Identical HTML output across browsers</li>
                    <li>Gracefully degrades to a <code>textarea</code>
                              when JavaScript is turned off</li>
                </ul>

                <p>
                    Read <a href="http://www.telerik.com/products/aspnet-mvc/editor.aspx">more details</a>
                    or send us your
                    <a href="http://www.telerik.com/community/forums/aspnet-mvc.aspx">feedback</a>!
                </p>
             </text>)
               .Render();
    }
    <p>
        <button type="submit" class="t-button t-state-default">Post to see the generated HTML</button>
    </p>
    @{ Html.EndForm(); }

    @if (ViewData.ContainsKey("value")) { 
        <h3>Editor Value</h3>

        <pre class="prettyprint editor-output">@Html.Raw((string)ViewData["value"]) </pre>
     } 

    <noscript>
        <p>Your browsing experience on this page will be better if you visit it with a JavaScript-enabled browser / if you enable JavaScript.</p>
    </noscript>

     @Html.Partial("_AccessibilityValidation") 


@section HeadContent {

    <style type="text/css">
        .editor-output
        {
            font: normal 1em/1.1em "Consolas", "Monaco", "Bitstream Vera Sans Mono", "Courier New", Courier, monospace;
            border: 1px solid #ccc;
            background: #fff;
            display: block;
            padding: 4px 8px 8px;
        }
    </style>

}
